package com.app.orderservicesample.handler;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: 伴你时光尽头
 * @Date: 2019/11/7 19:38
 */
@RestController
@Data
public class OrderHandler {

    @Value("${server.port}")
    private String port;


    @GetMapping("/hi")
    @ResponseBody
    public String hi(String name){

        return "这是"+name+"端口号为"+port;
    }

    @GetMapping("/showpic")
    public ModelAndView  showpic(String name){


        return new ModelAndView("order.html");
    }
}
